package com.aioz.security.service.impl;

import com.aioz.security.common.ResponseResult;
import com.aioz.security.entity.Education;
import com.aioz.security.entity.LoginUser;
import com.aioz.security.entity.Resume;
import com.aioz.security.mapper.EducationMapper;
import com.aioz.security.mapper.ResumeMapper;
import com.aioz.security.service.EducationService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Aioz
 * @since 2022-09-27
 */
@Service
public class EducationServiceImpl extends ServiceImpl<EducationMapper, Education> implements EducationService {


    @Resource
    private ResumeMapper resumeMapper;

    @Resource
    private EducationMapper educationMapper;

    @Override
    public ResponseResult addEducation(Education education) {
        educationMapper.insert(education);
        return new ResponseResult(200,"添加教育信息成功！");
    }

    @Override
    public ResponseResult updateEducation(Education education) {
        educationMapper.updateById(education);
        return new ResponseResult(200,"更新教育信息成功！");
    }
}
